﻿Public Class frmChinh

    Private Sub frmChinh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Hiện usercontrol tương ứng lên các tab page trong tab KhamBenh

        'ucDangKyKhamBenh -> tabpage DangKyKhamBenh
        Dim ucDS = New ucDangKyKhamBenh()
        tpDangKyKhamBenh.Controls.Add(ucDS)
        'ucPhieuKhamBenh->tabpage PhieuKhamBenh
        Dim ucPKB = New ucPhieuKhamBenh()
        tpPhieuKhamBenh.Controls.Add(ucPKB)
        'ucDanhSachDangKyKhamBenh->tabpage DanhSachDangKyKhamBenh
        Dim ucDSDKKB = New ucDanhSachDangKyKhamBenh()
        tpDanhSachDangKyKhamBenh.Controls.Add(ucDSDKKB)
        'ucThayDoiThongTinThuoc->tabpage ThayDoiThongTinThuoc
        Dim ucTDTTT = New ucThayDoiThongTinThuoc()
        tpThayDoiThongTinThuoc.Controls.Add(ucTDTTT)
        'ucKeThuoc->tpKeThuoc
        Dim ucKT = New ucKeThuoc()
        tpKeThuoc.Controls.Add(ucKT)
        'ucBN->tpBaoCao
        'Dim ucBN = New ucBenhNhan()
        'Me.tpBaoCao.Controls.Add(ucBN)

        'ucBaoCaoSuDungThuoc->tpSuDungThuoc
        Dim ucBCSDT = New ucBaoCaoSuDungThuoc()
        tpSuDungThuoc.Controls.Add(ucBCSDT)
        'ucBaoCaoNgay->tpNgay
        Dim ucBCNgay = New ucBaoCaoNgay()
        tpNgay.Controls.Add(ucBCNgay)
        'ucTraCuu->tpTraCuuBenhNhan
        Dim ucTraCuu = New ucTraCuuBenhNhan()
        tpTraCuuBenhNhan.Controls.Add(ucTraCuu)
        ' thay doi tham so
        Dim ucthamso = New ucThayDoiThamSo()
        tpthaydoithamso.Controls.Add(ucthamso)
        SetStyle(ControlStyles.UserPaint, True)
        SetStyle(ControlStyles.AllPaintingInWmPaint, True)
        SetStyle(ControlStyles.DoubleBuffer, True)
    End Sub

    Private Sub tpDanhSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tpKhamBenh.Click

    End Sub

    Private Sub pbxOpen_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs)
        'pbxOpen.BackColor = Color.Blue
        'pbxOpen.BorderStyle = BorderStyle.FixedSingle
    End Sub
    ''' <summary>
    ''' Sự kiện trên picturebox Open
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub pbxOpen_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxOpen.MouseLeave, pbxThuNho.MouseLeave, pbxTienToi.MouseLeave, pbxLuu.MouseLeave
        pbxOpen.BackColor = Color.Transparent
        pbxOpen.BorderStyle = BorderStyle.None
    End Sub

    Private Sub pbxOpen_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxOpen.MouseHover, pbxThuNho.MouseHover, pbxTienToi.MouseHover, pbxLuu.MouseHover
        pbxOpen.BackColor = Color.AliceBlue
        pbxOpen.BorderStyle = BorderStyle.FixedSingle
    End Sub
    ''' <summary>
    ''' Sự kiện trên picturebox New
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub pbxNew_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxNew.MouseHover, pbxPhongTo.MouseHover, pbxQuayLui.MouseHover
        pbxNew.BackColor = Color.AliceBlue
        pbxNew.BorderStyle = BorderStyle.FixedSingle
    End Sub

    Private Sub pbxNew_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxNew.MouseLeave, pbxPhongTo.MouseLeave, pbxQuayLui.MouseLeave
        pbxNew.BackColor = Color.Transparent
        pbxNew.BorderStyle = BorderStyle.None
    End Sub

    Private Sub pnlHeader_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles pnlHeader.Paint

    End Sub

    Private Sub CấuHìnhToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CấuHìnhToolStripMenuItem.Click
        Dim frmCH As frmCauHinh = New frmCauHinh()
        frmCH.Show()
    End Sub

    Private Sub QToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QToolStripMenuItem.Click
        ofdMo.ShowDialog()
    End Sub

    Private Sub ToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem2.Click
        'Neu la lan luu file dau tien thi se hien dialog de nguoi dung xac dinh vi tri luu file
        Dim bLaLanLuuDauTien = False
        If (bLaLanLuuDauTien) Then
            sfdLuu.ShowDialog()
        Else
            'luu file bang thu muc mac dinh
        End If
    End Sub

    Private Sub LưuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LưuToolStripMenuItem.Click
        sfdLuu.ShowDialog()
    End Sub

    Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click
        MessageBox.Show("Nhung file mo gan day la : x")
    End Sub

    Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click
        'Export ra dinh file *.pdf *.xls 
    End Sub

    Private Sub ĐóngToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ĐóngToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub ToolStripMenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem6.Click
        'tro ve buoc truoc 
    End Sub

    Private Sub ToolStripMenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem5.Click
        'toi buoc sau
    End Sub

    Private Sub SaoChépToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaoChépToolStripMenuItem.Click
        'sao chep file
    End Sub

    Private Sub ToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem3.Click
        MessageBox.Show("tao tai lieu moi")
    End Sub

    Private Sub HướngDẫnToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HướngDẫnToolStripMenuItem.Click

    End Sub

    Private Sub AToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AToolStripMenuItem.Click
        frmDangKy.ShowDialog()
    End Sub
End Class